<?php
 
class Default_Form_Login extends EasyBib_Form {

    public function init() {
        
        $this->setAttrib("class", "");
        
        $mail = $this->createElement('text', 'email', array('label' => 'E-Mail'));
        $mail->setRequired(true);
        $mail->addValidator('NotEmpty', true);
        $mail->setAttrib('tabindex', 1);
        
        $password = $this->createElement('text', 'password', array('label' => 'Contraseña'));
        $password->setRequired(true);
        $password->addValidator('NotEmpty', true);
        $password->setAttrib('tabindex', 2);

        $submit = new Zend_Form_Element_Submit('botonLogin');
        $submit->setLabel('Ingresar');
        $submit->setAttrib('tabindex', 4);
        $submit->setAttrib('class', 'btn btn-primary');
        
        $this->addElements(array($mail, $password,$submit));
        
        $this->addDisplayGroup(array($mail, $password), "group1", array());
        $this->addDisplayGroup(array($submit), "actions", array());
        
        EasyBib_Form_Decorator::setFormDecorator($this, EasyBib_Form_Decorator::BOOTSTRAP, 'botonLogin');
    }
    
        public function __construct( ) {
    
        $traduccion = new Zend_Translate('array', APPLICATION_PATH . '/langs/es.php', 'es');

        $this->setDefaultTranslator($traduccion);
        parent::__construct();
    }

}

